package com.csair.irp.job.file.parser.aetatk;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 菲猫
 * @ClassName: TicketReconDataPO
 * @Description: by CodeGenerate
 * @date 2017-7-19
 */
@TableName("t_ticket_recon_data")
@Getter
@Setter
@ToString
public class TicketReconDataPO extends Model<TicketReconDataPO> {

    private static final long serialVersionUID = 1L;

    /**
     * ( 主键 ) 
     */
    private Long id;
    /**
     * 票号
     */
    private Long ticketNumber;
    /**
     * 联票标识符
     */
    private String conjunctionTicketIndicator;
    /**
     * 联票中的第一张票
     */
    private String conjunctionPrimeTicket;
    /**
     * 联票序号
     */
    private Integer conjunctionRelativeTicket;
    /**
     * 总票数
     */
    private Integer conjunctionTotalTickets;
    /**
     * 航段标识符
     */
    private String couponInd;
    /**
     * 关联票号
     */
    private String associatedTicketNumber;
    /**
     * 出票类型：TKTA:自动出票
     */
    private String transactionCode;
    /**
     * 支付类型
     */
    private String formOfPaymentType;
    /**
     * 出票日期
     */
    private String createTicketTime;
    /**
     * 结算价
     */
    private Double settlementPrice = 0.0;
    /**
     * 结算货币
     */
    private String settlementCurrency;
    /**
     * 支付价/调账金额/票面价
     */
    private Double fareAmount = 0.0;
    /**
     * 票价币种
     */
    private String fareCurrency;
    /**
     * 基本费
     */
    private Double basicFee = 0.0;
    /**
     * X费
     */
    private Double xFee = 0.0;
    /**
     * (CP)退票费
     */
    private Double cp = 0.0;
    /**
     * (OB)变更费
     */
    private Double ob = 0.0;
    /**
     * (CN)民航发展基金
     */
    private Double cn = 0.0;
    /**
     * (YQ)航空保险附加费
     */
    private Double yq = 0.0;
    /**
     * (TX)其他税费
     */
    private Double yr = 0.0;
    /**
     * (YR)燃油附加费
     */
    private Double tx = 0.0;
    /**
     * 税费总计
     */
    private Double totalTaxes = 0.0;
    /**
     * 应收账款/应上交款?
     */
    private Double totalAmount = 0.0;
    /**
     * 实收价/实退票价/EMD实收价
     */
    private Double collectedFare = 0.0;
    /**
     * 原客票号
     */
    private String originalTicketNumber;
    /**
     * 创建时间
     */
    private Date creationTime;
    /**
     * 国内国际标识
     */
    private Integer domesticIndicate;
    /**
     * 勾稽-订单数据
     */
    private Integer checkedSellData;
    /**
     * 退款或退单号，用于对账或差异处理，需要过滤掉售票商代码如：784
     */
    private String refundno;
    /**
     * 入库数据的文件ID
     */
    private Long fileManagerId;

    /**
     * 是否删除
     */
    @TableField("del")
    private String del;

    private String disabledsoldiersidtype;


    @Override
    public boolean equals(Object obj) {
        TicketReconDataPO ticketrecon = (TicketReconDataPO) obj;
        return this.getTicketNumber().equals(ticketrecon.getTicketNumber())
                && this.getCouponInd().equals(ticketrecon.getCouponInd())
                && this.getAssociatedTicketNumber().equals(ticketrecon.getAssociatedTicketNumber())
                && this.getTransactionCode().equals(ticketrecon.getTransactionCode())
                && this.getFormOfPaymentType().equals(ticketrecon.getFormOfPaymentType())
                && this.getCreateTicketTime().equals(ticketrecon.getCreateTicketTime())
                && this.getDomesticIndicate().equals(ticketrecon.getDomesticIndicate());
    }

    @Override
    protected Serializable pkVal() {
        return id;
    }
}